package 一些算法竞赛测试题;

import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-11-16
 * Time: 13:36
 */
public class Demo17 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();
        while(T-- > 0){
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if(a == 1 && b == 2 || a == 2 && b == 1){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
    }
}
